#include "BufferFilter.h"


BufferFilter::BufferFilter(int inputsCount) : Filter(inputsCount,inputsCount)
{
	buffer = new cv::Mat[inputsCount];
}


BufferFilter::~BufferFilter(void)
{
	delete[] buffer;
}

void BufferFilter::Process()
{
	for (int i = 0; i < GetInputsCount(); ++i)
	{
		outputs[i] = buffer[i].clone();
		if (buffer[i].empty())
		{
			outputValid[i] = false;
		}

		buffer[i] = inputs[i]->clone();
	}
}
